export const formatNum = (val: any) => {
  val = Number(val);
  if (!val) {
    return 0.0;
  }
  if (val < 10000) {
    return Number(val).toFixed(5);
  } else if (val < 100000000) {
    val = (Number(val) / 1000000).toFixed(2) + " " + "亿";
    return val;
  } else {
    val = (Number(val) / 1000000000).toFixed(2) + " " + "万";
    return val;
  }
};